<%@ page import="br.com.incodeworks.mercurio.Projeto" %>
<!doctype html>
<html>
<head>
<meta name="layout" content="main">
<g:set var="entityName" value="${message(code: 'projeto.label', default: 'Projeto')}" />
<title><g:message code="default.create.label" args="[entityName]" /></title>
</head>
<body>

	<div class="flat_area grid_16">
		<h2>
			<g:message code="default.create.label" args="[entityName]" />
		</h2>
	</div>

	<div class="box grid_16">
		<div class="block">
			<div class="section clearfix">
				<fieldset class="label_side label_small">
					<g:link class="list" action="list">
						<button class="img_icon has_text">
							<g:img file="icons/small/white/list_w_images.png" />
							<span>Listar</span>
						</button>
					</g:link>
				</fieldset>
			</div>
		</div>
	</div>

	<g:if test="${flash.message}">
		<div class="box grid_16 no_titlebar" style="opacity: 1;">
			<div class="toggle_container">
				<div class="block" style="opacity: 1;">
					<div class="section" style="padding-bottom: 5px;">
						<div class="alert dismissible alert_blue">
							<g:img height="24" width="24" file="icons/small/white/alert_2.png" />
							${flash.message}
						</div>
					</div>
				</div>
			</div>
		</div>
	</g:if>

	<g:hasErrors bean="${projetoInstance}">
		<div class="box grid_16 no_titlebar" style="opacity: 1;">
			<div class="toggle_container">
				<div class="block" style="opacity: 1;">
					<div class="section" style="padding-bottom: 5px;">
						<g:eachError bean="${projetoInstance}" var="error">
							<div class="alert dismissible alert_red" <g:if test="${error in org.springframework.validation.FieldError}">data-field-id="${error.field}"</g:if>>
								<g:img height="24" width="24" file="icons/small/white/alert.png" />
								<g:message error="${error}" />
							</div>
						</g:eachError>
					</div>
				</div>
			</div>
		</div>
	</g:hasErrors>

	<div class="box grid_16">
		<div class="toggle_container">
			<div class="block">

				<div id="create-projeto" class="content scaffold-create" role="main">


					<g:form action="save"  class="validate_form" novalidate="novalidate">
						<fieldset class="label_side">
							<g:render template="form" />
						</fieldset>
						<div class="button_bar clearfix">
							<button class="green" type="submit">
								<g:img height="24" width="24" file="icons/small/white/bended_arrow_right.png" />
								<span><g:message code="default.button.create.label" default="Salvar" /></span>
							</button>
						</div>
					</g:form>
				</div>

			</div>
		</div>
	</div>
	<script type="text/javascript">
	$(".validate_form").validate();
</script>
</body>
</html>
